import Vue from 'vue'
import http from './http'

Vue.prototype.$http = {
  //获取html
  async gethtml() {
    return http.post('https://dip.wanyol.com/editor/getEditorDocument?title=' + title)
  },
  //上传html
  async puthtml(html) {
    return http.post('https://dip.wanyol.com/editor/updateEditorDocument', html)
  },
  //搜索文档
  async search() {
    return http.post('http://10.114.101.232:8089/editor/getDocumentByComment?comment=' + '中华' + '&startNum=0&pageSize=2')
  },
  //mockjs
  async mock() {
    return http.get('http://www.lihefei.com/api/test?name=lihefei')
  },
  async download() {
    return http.get('http://10.114.101.232:8089/fileservice/file/download?fileName=3.txt')
  }
}